<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        .searchbox {
            margin: 10px;
            display: flex;
            align-items: center;
        }

        .searchbox input {
            flex: 1;
            height: 42px;
            background-color: #f5f5f5;
            outline: none;
            border: none;
            padding-left: 20px;
            border-radius: 20px;
        }

        .searchbox span {
            width: 60px;
            text-align: center;
        }

        .block {
            margin: 10px;

        }

        .block .title {
            font-weight: bold;
            padding: 10px 0;
        }

        .block span .active {
            color: white;
            background-color: #ccc;
            font-size: 20px;
        }
        .suggest{
            display: flex;
            font-weight: bold;   
        }
        .suggest div{
            text-align: center;
            margin-right: 5px;
            margin-bottom: 5px;
            border-radius: 3px;
        }
        .banner {
            margin: 10px;
            width: auto;
            height: 100px;
            background-color: skyblue;
            border-radius: 10px;
        }

        .block div.active {
            width: 20%;
            background-color: skyblue;
        }

        .card{
            display: flex;
            width: auto;
            height: 90px;
            background-color: palegoldenrod;
            margin-bottom: 10px;
            margin-top: 10px;
        }
        .card img{
            width: 17%;
            margin: 10px;
            margin-right: 50px;

        }

        .tabbar {
            position: fixed;
            bottom: 0;
            width: 100%;
            padding: 10px;
            border-top: 1px solid #ccc;
            box-sizing: border-box;
            display: flex;
            justify-content: space-around;
            text-align: center;
            line-height: 40px;
        }

        .tabbar div.active {
            width: 33%;
            background-color: skyblue;
        }
    </style>
</head>

<body>
    <div id="app">
        <div class="searchbox">
            <input type="text" placeholder="输入搜索店铺" v-model="searchText">
            <span @click="search">搜索</span>
        </div>


        <div class="banner"></div>

        <div class="block">
            <div class="title">搜索发现</div>
            <div class="suggest">
                <div :class="{active: currentIndex == index }" @click="handleClick(index)" class="btn"
                    v-for="(item,index) in arr">

                    <div class="name">{{item.name}}</div>
                </div>

            </div>

            <div class="card" v-for="(item,index) in arr2">
                <img :src="item.pic" alt="">
                <div class="content" >
                    <div class="title">{{item.title1}}</div>
                    <span class="cond">⭐{{item.cond}}</span>
                    <span class="num">月售{{item.num}}</span>
                    
                </div>

            </div>



            <div class="tabbar">
                <div :class="{active: currentIndex2 == index }" @click="handleClick2(index)" class="btn1"
                    v-for="(item,index) in list">

                    <div class="name">{{item.name}}</div>

                </div>
            </div>
        </div>

        <script src="./vue-2.5.21.js"></script>
        <script src="./最后一步.js"></script>
</body>

</html>